<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
  <th:block th:include="include :: header('我的已办')"/>
</head>
<body class="gray-bg">
<div class="container-div">
  <div class="row">
    <div class="col-sm-12 search-collapse">
      <form id="formId">
        <div class="select-list">
          <ul>
            <!--<li>
                <p>请假类型：</p>
                <select name="type" th:with="type=${@dict.getType('biz_leave_type')}">
                    <option value="">所有</option>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                </select>
            </li>-->
            <li>
              <p>流程实例ID：</p>
              <input type="text" name="instanceId"/>
            </li>
            <li>
              <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
              <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
            </li>
          </ul>
        </div>
      </form>
    </div>

    <div class="btn-group-sm" id="toolbar" role="group">
      <!--<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="process:leave:export">
          <i class="fa fa-download"></i> 导出
       </a>-->
    </div>
    <div class="col-sm-12 select-table table-striped">
      <table id="bootstrap-table"></table>
    </div>
  </div>
</div>
<th:block th:include="include :: footer"/>
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
  var prefix = ctx + "repair/repairFeeInquiry";

  $(function () {
    var options = {
      url: prefix + "/taskDoneList",
      createUrl: prefix + "/add",
      updateUrl: prefix + "/edit/{id}",
      removeUrl: prefix + "/remove",
      exportUrl: prefix + "/export",
      detailUrl: prefix + "/edit/{id}",
      modalName: "询价业务",
      columns: [{
        checkbox: true
      },
        {
          field: 'id',
          title: '主键',
          visible: false
        },
        {
          field: 'repairId',
          title: '维修编号'
        },
        {
          field: 'title',
          title: '询价事项描述名称'
        },
        {
          field: 'totalFee',
          title: '询价总计费用'
        },
        {
          field: 'repairHours',
          title: '人工工时'
        },
        {
          field: 'hourPrice',
          title: '维修人工时价'
        },
        {
          field: 'discount',
          title: '折扣'
        },
        {
          field: 'repairHoursTotalFee',
          title: '人工费用小计'
        },
        {
          field: 'verhiclePartsFeeJson',
          title: '零部件费用'
        },
        {
          field: 'startTime',
          title: '开始时间',
          visible: false
        },
        {
          field: 'endTime',
          title: '结束时间',
          visible: false
        },
        {
          field: 'instanceId',
          title: '流程实例ID',
          visible: false
        },
        {
          field: 'applyUser',
          title: '申请人'
        },
        {
          field: 'applyTime',
          title: '申请时间'
        },
        {
          field: 'taskId',
          title: '当前任务ID',
          visible: false
        },
        {
          field: 'taskName',
          title: '当前任务名称',
          align: 'center',
          formatter: function (value, row, index) {
            return '<span class="badge badge-primary">' + value + '</span>';
          }
        },
        {
          field: 'realityStartTime',
          title: '实际开始时间',
          visible: false
        },
        {
          field: 'realityEndTime',
          title: '实际结束时间',
          visible: false
        },
        {
          title: '操作',
          align: 'center',
          formatter: function (value, row, index) {
            var actions = [];
            actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i> 申请详情</a> ');
            actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
            actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
            return actions.join('');
          }
        }]
    };
    $.table.init(options);
  });
</script>
</body>
</html>
